<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/**
 *
 * theme-options.inc.php include file
 *
 * (c) 2011 by Mike Walsh
 *
 * @author Mike Walsh <mike@walshcrew.com>
 * @package CASL-Soccer-2011
 * @subpackage options
 * @version $Revision$
 * @lastmodified $Author$
 * @lastmodifiedby $Date$
 *
 */

//  The TEMPLATEPATH constant can't be used for child
//  themes as it returns the parent theme path so we
//  need to figure out what CASLTTHEMEPATH is ...

define("CASLTHEMEPATH", get_stylesheet_directory()) ;

//  Define constants to drive the theme options page.
//  These values are important and should not be changed
//  as they drive the selection of the proper header
//  image and CSS file.

define('CASL_THEME_LEAGUE_LOGO_CASL', 'CASL') ;
define('CASL_THEME_LEAGUE_LOGO_RECREATIONAL', 'Recreational') ;
define('CASL_THEME_LEAGUE_LOGO_CHALLENGE', 'Challenge') ;
define('CASL_THEME_LEAGUE_LOGO_CLASSIC', 'Classic') ;
define('CASL_THEME_LEAGUE_LOGO_YTS', 'YTS') ;
define('CASL_THEME_LEAGUE_LOGO_AMBASSADORS', 'Ambassadors') ;
define('CASL_THEME_LEAGUE_LOGO_CHELSEA', 'Chelsea') ;
define('CASL_THEME_LEAGUE_LOGO_NONE', 'None') ;

define('CASL_THEME_LEAGUE_LOGO_IMAGE', 'CASL_%s_Logo.png') ;
define('CASL_THEME_DEFAULT_LEAGUE_LOGO', CASL_THEME_LEAGUE_LOGO_CASL) ;

//define('CASL_THEME_COLOR_SCHEME_RED', 'red') ;
//define('CASL_THEME_COLOR_SCHEME_BLUE', 'blue') ;
//define('CASL_THEME_COLOR_SCHEME_BLACK', 'black') ;
//define('CASL_THEME_COLOR_SCHEME_WHITE', 'white') ;
//define('CASL_THEME_DEFAULT_COLOR_SCHEME', CASL_THEME_COLOR_SCHEME_BLACK) ;

//define('CASL_THEME_COLOR_SCHEME_IMAGE', 'casl-%s-scheme.png') ;
//define('CASL_THEME_COLOR_SCHEME_IMAGE_DISPLAY_WIDTH', '400px') ;
//define('CASL_THEME_COLOR_SCHEME_IMAGE_DISPLAY_HEIGHT', '100px') ;

define('CASL_THEME_OPTION_LLI', 'caslleaguelogoimg') ;
define('CASL_THEME_OPTION_HIL', 'casllfthdrimg') ;
define('CASL_THEME_OPTION_HIC', 'caslctrhdrimg') ;
define('CASL_THEME_OPTION_HIR', 'caslrghthdrimg') ;
define('CASL_THEME_OPTION_HDR_DIV_CSS', 'caslhdrdivcss') ;
define('CASL_THEME_OPTION_LLI_DIV_CSS', 'caslleaguelogodivcss') ;
define('CASL_THEME_OPTION_LLI_IMG_CSS', 'caslleaguelogoimgcss') ;
define('CASL_THEME_OPTION_HIL_DIV_CSS', 'casllfthdrdivcss') ;
define('CASL_THEME_OPTION_HIL_IMG_CSS', 'casllfthdrimgcss') ;
define('CASL_THEME_OPTION_HIC_DIV_CSS', 'caslctrhdrdivcss') ;
define('CASL_THEME_OPTION_HIC_IMG_CSS', 'caslctrhdrimgcss') ;
define('CASL_THEME_OPTION_HIR_DIV_CSS', 'caslrghthdrdivcss') ;
define('CASL_THEME_OPTION_HIR_IMG_CSS', 'caslrghthdrimgcss') ;
//define('CASL_THEME_OPTION_COLOR_SCHEME', 'caslclrschm') ;
define('CASL_THEME_OPTION_LEAGUE_LOGO', 'caslleaguelogo') ;
define('CASL_THEME_OPTION_BLOG_TITLE_CSS', 'casltitlecss') ;
define('CASL_THEME_OPTION_BLOG_TAGLINE_CSS', 'casltaglinecss') ;
define('CASL_THEME_OPTION_BRANDING_DIV_CSS', 'caslbrandingcss') ;
define('CASL_THEME_OPTION_THUMBNAIL_SCALE_FACTOR', 'caslthmbsclfctr') ;

//  Default theme options

define('CASL_THEME_OPTION_LLI_DEFAULT', CASL_THEME_DEFAULT_LEAGUE_LOGO) ;
define('CASL_THEME_OPTION_HIL_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIC_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIR_DEFAULT', '') ;
define('CASL_THEME_OPTION_HDR_DIV_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_LLI_DIV_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_LLI_IMG_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIL_DIV_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIL_IMG_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIC_DIV_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIC_IMG_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIR_DIV_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_HIR_IMG_CSS_DEFAULT', '') ;
//define('CASL_THEME_OPTION_COLOR_SCHEME_DEFAULT', CASL_THEME_DEFAULT_COLOR_SCHEME) ;
define('CASL_THEME_OPTION_LEAGUE_LOGO_DEFAULT', CASL_THEME_DEFAULT_LEAGUE_LOGO) ;
define('CASL_THEME_OPTION_BLOG_TITLE_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_BLOG_TAGLINE_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_BRANDING_DIV_CSS_DEFAULT', '') ;
define('CASL_THEME_OPTION_THUMBNAIL_SCALE_FACTOR_DEFAULT', 0.67) ;

/**
 * Returns the default options for CASL.
 *
 * @since CASL-Soccer 2.0
 */
function casl_get_default_theme_options()
{
	$default_theme_options = array(
        CASL_THEME_OPTION_LLI => CASL_THEME_OPTION_LLI_DEFAULT
       ,CASL_THEME_OPTION_HIL => CASL_THEME_OPTION_HIL_DEFAULT
       ,CASL_THEME_OPTION_HIC => CASL_THEME_OPTION_HIC_DEFAULT
       ,CASL_THEME_OPTION_HIR => CASL_THEME_OPTION_HIR_DEFAULT
       ,CASL_THEME_OPTION_HDR_DIV_CSS => CASL_THEME_OPTION_HDR_DIV_CSS_DEFAULT
       ,CASL_THEME_OPTION_LLI_DIV_CSS => CASL_THEME_OPTION_LLI_DIV_CSS_DEFAULT
       ,CASL_THEME_OPTION_LLI_IMG_CSS => CASL_THEME_OPTION_LLI_IMG_CSS_DEFAULT
       ,CASL_THEME_OPTION_HIL_DIV_CSS => CASL_THEME_OPTION_HIL_DIV_CSS_DEFAULT
       ,CASL_THEME_OPTION_HIL_IMG_CSS => CASL_THEME_OPTION_HIL_IMG_CSS_DEFAULT
       ,CASL_THEME_OPTION_HIC_DIV_CSS => CASL_THEME_OPTION_HIC_DIV_CSS_DEFAULT
       ,CASL_THEME_OPTION_HIC_IMG_CSS => CASL_THEME_OPTION_HIC_IMG_CSS_DEFAULT
       ,CASL_THEME_OPTION_HIR_DIV_CSS => CASL_THEME_OPTION_HIR_DIV_CSS_DEFAULT
       ,CASL_THEME_OPTION_HIR_IMG_CSS => CASL_THEME_OPTION_HIR_IMG_CSS_DEFAULT
       ,CASL_THEME_OPTION_LEAGUE_LOGO => CASL_THEME_OPTION_LEAGUE_LOGO_DEFAULT
       ,CASL_THEME_OPTION_BLOG_TITLE_CSS => CASL_THEME_OPTION_BLOG_TITLE_CSS_DEFAULT
       ,CASL_THEME_OPTION_BLOG_TAGLINE_CSS => CASL_THEME_OPTION_BLOG_TAGLINE_CSS_DEFAULT
       ,CASL_THEME_OPTION_BRANDING_DIV_CSS => CASL_THEME_OPTION_BRANDING_DIV_CSS_DEFAULT
       ,CASL_THEME_OPTION_THUMBNAIL_SCALE_FACTOR => CASL_THEME_OPTION_THUMBNAIL_SCALE_FACTOR_DEFAULT
	) ;

	return apply_filters('casl_default_theme_options', $default_theme_options) ;
}

/**
 * Returns the options array for CASL.
 *
 * @since CASL-Soccer 2.0
 */
function casl_get_theme_options()
{
    //  Get the default options in case anything new has been added
    $default_options = casl_get_default_theme_options() ;

    //  Merge the default with any options currently saves by WordPress
    $theme_options = wp_parse_args(get_option('casl_theme_options', array()), $default_options) ;

    return $theme_options ;
}
?>
